import java.util.Scanner;

/**
 * 数字颠倒
 */
public class HJ11 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String numStr = sc.nextLine();
            char[] charArray = numStr.toCharArray();
            StringBuilder sb = new StringBuilder();
            for (int i = charArray.length - 1; i >= 0; i--) {
                sb.append(charArray[i]);
            }
            System.out.println(sb.toString());
        }
    }
}
